Regular Expression
Q1.
Consider the regular expression R = (a + b)^* (aa + bb) (a + b)^* Which deterministic finite automaton accepts the language represented by the regular expression R?Q2.
Which regular expression best describes the language accepted by the non-deterministic automaton below?Q3.
Which one of the following regular expressions is NOT equivalent to the regular expression (a + b + c)^*?Q4.
Consider the regular expression R = (a + b)^* \ (aa + bb) \ (a + b)^* Which one of the regular expressions given below defines the same language as defined by the regular expression R ?Q5.
Consider the following definition of a lexical token id for an identifier in a programming language, using extended regular expressions: letter \rightarrow [A-Za-z] digit \rightarrow [0-9] id \rightarrow letter (letter\;| \;digit)^* Which one of the following Non-deterministic Finite-state Automata with - transitions accepts the set of valid identifiers? (A double-circle denotes a final state)Q6.
Which of the following regular expressions represent(s) the set of all binary numbers that are divisible by three? Assume that the string \epsilon is divisible by three.[MSQ]Q7.
Which of the following regular expressions describes the language over\{0, 1\} consisting of strings that contain exactly two 1's?Q8.
Consider the Deterministic Finite-state Automaton (DFA) A shown below. The DFA runs on the alphabet {0, 1}, and has the set of states {s, p, q, r}, with s being the start state and p being the only final state.Which one of the following regular expressions correctly describes the language accepted by A?Q9.
Which one of the following regular expressions represents the set of all binary strings with an odd number of 1's?Q10.
Which one of the following regular expressions represents the language: the set of all binary strings having two consecutive 0s and two consecutive 1s?